#

| Chapter 35 You Can't Quite Call This Editing |

## 35.13 Other Conversions with dd

Besides converting between ASCII and EBCDIC (35.12), you can use dd to convert:

- fixed length to variable-length records (conv=unblock), and the reverse (conv=block)

- uppercase to lowercase (conv=lcase), and the reverse (conv=ucase)

- the byte order of every pair of bytes (conv=swab)

The `cbs=` option must be used to specify a conversion buffer size when using block and unblock. (This is also true when using conversions between ASCII and EBCDIC.) The specified number of characters are put into the conversion buffer. For ascii and unblock conversion, trailing blanks are trimmed and a newline is added to each buffer before it is output. For ebcdic, ibm, and block, the input is padded with blanks up to the specified conversion buffer size.

- TOR

35.12 Converting Between ASCII and EBCDIC |  | 35.14 Cutting Columns or Fields with cut